import store from "../store";
export const layoutList = [
  {
    layoutid: 'horizontal',
    layoutname: '横幅'
  },
  {
    layoutid: 'vertical',
    layoutname: '竖幅'
  },
  {
    layoutid: 'square',
    layoutname: '方幅'
  },
  {
    layoutid: 'unknown',
    layoutname: '未知'
  }
]

export function getLayoutName(layoutid) {
  let layoutname = ''
  layoutList.forEach((layout) => {
    if (layout.layoutid === layoutid) {
      layoutname = layout.layoutname
    }
  })
  return layoutname
}

export const imageTypeList = [
  {
    typeid: 1,
    typename: '自有'
  },
  {
    typeid: 0,
    typename: '非自有'
  }
]

export const videoTypeList = [
  {
    typeid: 'vod',
    typename: '点播介质'
  },
  {
    typeid: 'live',
    typename: '直播介质'
  }
]

export function getVideoTypeName(typeid) {
  let typename = ''
  videoTypeList.forEach(type => {
    if (type.typeid === typeid) {
      typename = type.typename
    }
  })
  return typename
}

export function getImageTypeName(typeid) {
  let typename = ''
  imageTypeList.forEach((type) => {
    if (type.typeid == typeid) {
      typename = type.typename
    }
  })
  return typename
}

export const sourceFromList = {
  "cloudstorage": "云存储",
  "unknown": "其它",
}

/**
 *
 * @param imageinfo
 * @param type
 * @returns {*}
 */
export function getImageUrl(imageinfo, type) {
  if (imageinfo.isself === 0) {
    return imageinfo.url
  } else {
    let baseUrl = process.env.VUE_APP_BASE_CLOUDSERVICE_API_URL + '/'
    if (type == 1) {
      baseUrl += 'view?'
    } else {
      let width = 40
      let height = 40
      if (imageinfo.layout == 'horizontal') {
        height = 30
      } else if (imageinfo.layout == 'vertical') {
        width = 30
      }
      baseUrl += 'thumbnail?width=' + width + '&height=' + height + '&'
    }
    return baseUrl + 'fid=' + imageinfo.sourceid + '&corpid=' + imageinfo.corpid + '&subid=' + imageinfo.subid + '&uid=' + imageinfo.uid
  }
}

export function getStorageImageUrl(fid, type) {
  let baseUrl = process.env.VUE_APP_BASE_CLOUDSERVICE_API_URL + '/'
  if (type == 1) {
    baseUrl += 'view?'
  } else {
    let width = 20
    let height = 30
    baseUrl += 'thumbnail?width=' + width + '&height=' + height + '&'
  }
  return baseUrl + 'fid=' + fid + '&corpid=' + store.getters.corpinfo.corpid + '&subid=' + store.getters.subinfo.subid + '&uid=' + store.getters.userinfo.uid
}

export function getmediaTypeName(mediaTypeList, mediatype) {
  let mediaTypeName = ''
  mediaTypeList.forEach(type => {
    if (type.mediatype === mediatype) {
      mediaTypeName = type.typename
    }
  })
  return mediaTypeName
}

export const videoMimeTypeList = [
  {
    mimeid: 'video/mp4',
    mimename: '.mp4(video/mp4)'
  },
  {
    mimeid: 'video/MP2T',
    mimename: '.ts(video/MP2T)'
  },
  {
    mimeid: 'application/x-mpegURL',
    mimename: '.m3u8(application/x-mpegURL) '
  }
]

export function getVideoMimeName(mimeid) {
  let mimename = ''
  videoMimeTypeList.forEach(mime => {
    if (mime.mimeid === mimeid) {
      mimename = mime.mimename
    }
  })
  return mimename
}

export const videoProtocolList = [
  {
    protocolid: 'hls',
    protocolname: 'HLS'
  },
  {
    protocolid: 'rtmp',
    protocolname: 'RTMP'
  },
  {
    protocolid: 'http-flv',
    protocolname: 'HTTP-FLV'
  }
]

export function getProtocolName(protocolid) {
  let protocolname = ''
  videoProtocolList.forEach(protocol => {
    if (protocol.protocolid === protocolid) {
      protocolname = protocol.protocolname
    }
  })
  return protocolname
}

export const livestateList = [
  {
    stateid: 'pending',
    statename: '等待直播'
  },
  {
    stateid: 'live',
    statename: '直播中'
  },
  {
    stateid: 'end',
    statename: '直播结束'
  },
  {
    stateid: 'unknown',
    statename: '未知'
  }
]

export function getLivestateName(stateid) {
  let statename = ''
  livestateList.forEach(state => {
    if (state.stateid === stateid) {
      statename = state.statename
    }
  })
  return statename
}

export function formatSize(value) {
  if (!value) {
    return '0 Bytes'
  }
  const unitArr = ["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]
  let index = 0
  let srcsize = parseFloat(value)
  index = Math.floor(Math.log(srcsize)/Math.log(1024))
  let size = srcsize/Math.pow(1024,index)
  size = size.toFixed(2)
  return size + unitArr[index]
}

export const mimeTypeList = {
  1000: 'text/cache-manifest',
  1010: 'text/calendar',
  1011: 'text/calendar',
  1012: 'text/x-vcalendar',
  1013: 'text/x-vcalendar',
  1020: 'text/css',
  1030: 'text/csv',
  1131: 'text/tab-separated-values',
  1132: 'text/tab-separated-values',
  1040: 'text/html',
  1041: 'text/html',
  1050: 'text/n3',
  1060: 'text/plain',
  1061: 'text/plain',
  1070: 'text/plain',
  1080: 'text/plain',
  1090: 'text/plain',
  1100: 'text/plain',
  1110: 'text/plain',
  1120: 'text/prs.lines.tag',
  1130: 'text/richtext',
  1140: 'text/sgml',
  1141: 'text/sgml',
  1150: 'text/troff',
  1151: 'text/troff',
  1152: 'text/troff',
  1153: 'text/troff',
  1154: 'text/troff',
  1155: 'text/troff',
  1170: 'text/turtle',
  1180: 'text/uri-list',
  1181: 'text/uri-list',
  1182: 'text/uri-list',
  1190: 'text/vcard',
  1191: 'text/x-vcard',
  1200: 'text/vnd.curl',
  1210: 'text/vnd.curl.dcurl',
  1220: 'text/vnd.curl.scurl',
  1221: 'text/vnd.curl.mcurl',
  1230: 'text/vnd.dvb.subtitle',
  1240: 'text/vnd.fly',
  1250: 'text/vnd.fmi.flexstor',
  1260: 'text/vnd.graphviz',
  1270: 'text/vnd.in3d.3dml',
  1280: 'text/vnd.in3d.spot',
  1290: 'text/vnd.sun.j2me.app-descriptor',
  1300: 'text/vnd.wap.wml',
  1310: 'text/vnd.wap.wmlscript',
  1320: 'text/x-asm',
  1321: 'text/x-asm',
  1330: 'text/x-c',
  1331: 'text/x-c',
  1332: 'text/x-c',
  1333: 'text/x-c',
  1334: 'text/x-c',
  1335: 'text/x-c',
  1350: 'text/x-c',
  1360: 'text/x-fortran',
  1361: 'text/x-fortran',
  1362: 'text/x-fortran',
  1363: 'text/x-fortran',
  1370: 'text/x-java-source',
  1380: 'text/x-opml',
  1390: 'text/x-pascal',
  1391: 'text/x-pascal',
  1400: 'text/x-nfo',
  1410: 'text/x-setext',
  1420: 'text/x-sfv',
  1430: 'text/x-uuencode',
  2000: 'image/gif',
  2010: 'image/jpeg',
  2011: 'image/jpeg',
  2012: 'image/jpeg',
  2013: 'image/jpeg',
  2014: 'image/jpeg',
  2015: 'image/pjpeg',
  2016: 'image/jpg',
  2020: 'image/png',
  2021: 'image/png',
  2022: 'image/x-png',
  2030: 'image/bmp',
  2031: 'image/x-bmp',
  2032: 'image/x-windows-bmp',
  2033: 'image/x-win-bitmap',
  2034: 'application/bmp',
  2035: 'application/x-bmp',
  2036: 'application/x-win-bitmap',
  2040: 'image/x-ms-bmp',
  2041: 'image/x-ms-bmp',
  2050: 'image/vnd.wap.wbmp',
  2060: 'image/xbm',
  2061: 'image/x-bitmap',
  2062: 'image/x-xbitmap',
  2063: 'image/x-xbm',
  2070: 'image/icon',
  2071: 'image/x-icon',
  2080: 'image/x-xpixmap',
  2090: 'image/tiff',
  2091: 'image/tiff',
  2100: 'image/g3fax',
  2110: 'image/cgm',
  2120: 'image/ief',
  2130: 'image/ktx',
  2140: 'image/prs.btif',
  2150: 'image/sgi',
  2160: 'image/svg+xml',
  2170: 'image/svg+xml',
  2180: 'image/vnd.adobe.photoshop',
  2190: 'image/vnd.dece.graphic',
  2191: 'image/vnd.dece.graphic',
  2192: 'image/vnd.dece.graphic',
  2193: 'image/vnd.dece.graphic',
  2200: 'image/vnd.dvb.subtitle',
  2210: 'image/vnd.djvu',
  2220: 'image/vnd.dwg',
  2230: 'image/vnd.dxf',
  2240: 'image/vnd.fastbidsheet',
  2250: 'image/vnd.fpx',
  2260: 'image/vnd.fst',
  2270: 'image/vnd.fujixerox.edmics-mmr',
  2280: 'image/vnd.fujixerox.edmics-rlc',
  2290: 'image/vnd.ms-modi',
  2300: 'image/vnd.ms-photo',
  2310: 'image/vnd.net-fpx',
  2320: 'image/vnd.xiff',
  2330: 'image/webp',
  2340: 'image/x-3ds',
  2350: 'image/x-cmu-raster',
  2360: 'image/x-cmx',
  2370: 'image/x-freehand',
  2371: 'image/x-freehand',
  2372: 'image/x-freehand',
  2373: 'image/x-freehand',
  2374: 'image/x-freehand',
  2380: 'image/x-mrsid-image',
  2390: 'image/x-pcx',
  2391: 'image/pcd',
  2400: 'image/x-pict',
  2401: 'image/x-pict',
  2402: 'image/pict',
  2410: 'image/x-portable-anymap',
  2420: 'image/x-portable-bitmap',
  2430: 'image/x-portable-graymap',
  2440: 'image/x-portable-pixmap',
  2450: 'image/x-rgb',
  2460: 'image/x-tga',
  2461: 'image/x-targa',
  2462: 'image/x-targa',
  2470: 'image/x-xwindowdump',
  2480: 'image/fif',
  3000: 'audio/adpcm',
  3010: 'audio/basic',
  3020: 'audio/basic',
  3030: 'audio/midi',
  3031: 'audio/midi',
  3032: 'audio/midi',
  3033: 'audio/midi',
  3040: 'audio/mp4',
  3050: 'audio/mpeg',
  3051: 'audio/mpeg',
  3052: 'audio/mpeg',
  3053: 'audio/mpeg',
  3054: 'audio/mpeg',
  3055: 'audio/mpeg',
  3056: 'audio/mpeg',
  3057: 'audio/mpeg',
  3058: 'audio/mpeg',
  3060: 'audio/ogg',
  3061: 'audio/ogg',
  3062: 'audio/ogg',
  3070: 'audio/s3m',
  3080: 'audio/silk',
  3090: 'audio/vnd.dece.audio',
  3091: 'audio/vnd.dece.audio',
  3100: 'audio/vnd.digital-winds',
  3110: 'audio/vnd.dra',
  3120: 'audio/vnd.dts',
  3130: 'audio/vnd.dts.hd',
  3140: 'audio/vnd.lucent.voice',
  3150: 'audio/vnd.ms-playready.media.pya',
  3160: 'audio/vnd.nuera.ecelp4800',
  3170: 'audio/vnd.nuera.ecelp7470',
  3180: 'audio/vnd.nuera.ecelp9600',
  3190: 'audio/vnd.rip',
  3200: 'audio/webm',
  3210: 'audio/x-aac',
  3220: 'audio/x-aiff',
  3221: 'audio/x-aiff',
  3222: 'audio/x-aiff',
  3230: 'audio/x-caf',
  3240: 'audio/x-flac',
  3250: 'audio/x-matroska',
  3260: 'audio/x-mpegurl',
  3270: 'audio/x-ms-wax',
  3280: 'audio/x-ms-wma',
  3290: 'audio/x-pn-realaudio',
  3300: 'audio/x-pn-realaudio',
  3310: 'audio/x-pn-realaudio-plugin',
  3320: 'audio/x-wav',
  3330: 'audio/xm',
  3340: 'audio/x-twinvq',
  3341: 'audio/x-twinvq',
  3342: 'audio/x-twinvq-plugin',
  3400: 'audio/x-cibn-amr',
  3401: 'audio/x-cibn-amr',
  4000: 'video/3gpp',
  4010: 'video/3gpp2',
  4020: 'video/h261',
  4030: 'video/h263',
  4040: 'video/h264',
  4050: 'video/jpeg',
  4060: 'video/jpm',
  4070: 'video/jpm',
  4080: 'video/mj2',
  4090: 'video/mj2',
  4100: 'video/mp4',
  4101: 'video/mp4',
  4102: 'video/mp4',
  4110: 'video/mpeg',
  4111: 'video/mpeg',
  4112: 'video/mpeg',
  4113: 'video/mpeg',
  4114: 'video/mpeg',
  4115: 'video/mpeg',
  4116: 'video/mpeg',
  4117: 'video/mpeg',
  4120: 'video/ogg',
  4130: 'video/quicktime',
  4131: 'video/quicktime',
  4132: 'video/quicktime',
  4140: 'video/vnd.dece.hd',
  4141: 'video/vnd.dece.hd',
  4150: 'video/vnd.dece.mobile',
  4151: 'video/vnd.dece.mobile',
  4160: 'video/vnd.dece.pd',
  4170: 'video/vnd.dece.pd',
  4180: 'video/vnd.dece.sd',
  4181: 'video/vnd.dece.sd',
  4190: 'video/vnd.dece.video',
  4191: 'video/vnd.dece.video',
  4200: 'video/vnd.dvb.file',
  4210: 'video/vnd.fvt',
  4220: 'video/vnd.mpegurl',
  4221: 'video/vnd.mpegurl',
  4230: 'video/vnd.ms-playready.media.pyv',
  4240: 'video/vnd.uvvu.mp4',
  4241: 'video/vnd.uvvu.mp4',
  4250: 'video/vnd.vivo',
  4260: 'video/webm',
  4270: 'video/x-f4v',
  4280: 'video/x-fli',
  4290: 'video/x-flv',
  4295: 'video/flc',
  4300: 'video/x-m4v',
  4310: 'video/x-matroska',
  4311: 'video/x-matroska',
  4320: 'video/x-matroska',
  4330: 'video/x-mng',
  4340: 'video/x-ms-asf',
  4341: 'video/x-ms-asf',
  4350: 'video/x-ms-vob',
  4360: 'video/x-ms-wm',
  4370: 'video/x-ms-wmv',
  4380: 'video/x-ms-wmx',
  4390: 'video/x-ms-wvx',
  4400: 'video/x-msvideo',
  4410: 'video/x-sgi-movie',
  4420: 'video/x-smv',
  4430: 'x-conference/x-cooltalk',
  4440: 'application/x-shockwave-flash',
  4450: 'application/vnd.rn-realmedia',
  4460: 'application/vnd.rn-realmedia-vbr',
  4470: 'application/vnd.rn-realmedia',
  4480: 'video/vdo',
  4490: 'video/vivo',
  4500: 'application/x-mpegURL',
  4510: 'video/MP2T',
  5000: 'application/xml',
  5001: 'application/xml',
  5002: 'application/dsml',
  5010: 'application/xml-dtd',
  5020: 'application/xhtml+xml',
  5021: 'application/xhtml+xml',
  5030: 'application/xop+xml',
  5040: 'application/xproc+xml',
  5050: 'application/xslt+xml',
  5060: 'application/xspf+xml',
  5070: 'application/xv+xml',
  5071: 'application/xv+xml',
  5072: 'application/xv+xml',
  5073: 'application/xv+xml',
  5080: 'application/yin+xml',
  5090: 'application/xcap-diff+xml',
  5100: 'application/xenc+xml',
  5110: 'application/lost+xml',
  5120: 'application/voicexml+xml',
  5130: 'application/rss+xml',
  5140: 'application/smil+xml',
  5141: 'application/smil+xml',
  5150: 'application/vnd.wap.wbxml',
  5160: 'application/vnd.wap.wmlc',
  5170: 'application/vnd.wap.wmlscriptc',
  5180: 'application/vnd.syncml+xml',
  5190: 'application/vnd.syncml.dm+wbxml',
  5200: 'application/vnd.syncml.dm+xml',
  5210: 'application/winhlp',
  5220: 'application/wsdl+xml',
  5230: 'application/wspolicy+xml',
  5240: 'text/vnd.wap.si',
  5241: 'application/vnd.wap.sic',
  5250: 'text/vnd.wap.sl',
  5251: 'application/vnd.wap.slc',
  5260: 'text/vnd.wap.co',
  5261: 'application/vnd.wap.coc',
  5270: 'application/vnd.wap.mms-message',
  5400: 'application/java-archive',
  5410: 'application/java-serialized-object',
  5420: 'application/java-vm',
  5430: 'application/x-java-jnlp-file',
  5440: 'application/vnd.jcp.javame.midlet-rms',
  5450: 'application/javascript',
  5460: 'application/json',
  5470: 'application/jsonml+json',
  6000: 'application/pdf',
  6100: 'application/msword',
  6110: 'application/msword',
  6120: 'application/rtf',
  6130: 'application/vnd.ms-excel',
  6131: 'application/vnd.ms-excel',
  6132: 'application/vnd.ms-excel',
  6133: 'application/vnd.ms-excel',
  6134: 'application/vnd.ms-excel',
  6135: 'application/vnd.ms-excel',
  6140: 'application/vnd.ms-excel.addin.macroenabled.12',
  6141: 'application/vnd.ms-excel.sheet.binary.macroenabled.12',
  6142: 'application/vnd.ms-excel.sheet.macroenabled.12',
  6143: 'application/vnd.ms-excel.template.macroenabled.12',
  6150: 'application/vnd.visio',
  6151: 'application/vnd.visio',
  6152: 'application/vnd.visio',
  6153: 'application/vnd.visio',
  6160: 'application/vnd.ms-powerpoint',
  6161: 'application/vnd.ms-powerpoint',
  6162: 'application/vnd.ms-powerpoint',
  6163: 'application/vnd.ms-powerpoint.addin.macroenabled.12',
  6164: 'application/vnd.ms-powerpoint.presentation.macroenabled.12',
  6165: 'application/vnd.ms-powerpoint.slide.macroenabled.12',
  6166: 'application/vnd.ms-powerpoint.slideshow.macroenabled.12',
  6167: 'application/vnd.ms-powerpoint.template.macroenabled.12',
  6170: 'application/vnd.ms-project',
  6171: 'application/vnd.ms-project',
  6180: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
  6190: 'application/vnd.openxmlformats-officedocument.presentationml.slide',
  6200: 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
  6210: 'application/vnd.openxmlformats-officedocument.presentationml.template',
  6230: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
  6240: 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
  6250: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
  6260: 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
  6270: 'application/vnd.ms-word.document.macroenabled.12',
  6280: 'application/vnd.ms-word.template.macroenabled.12',
  6290: 'application/vnd.ms-works',
  6291: 'application/vnd.ms-works',
  6292: 'application/vnd.ms-works',
  6293: 'application/vnd.ms-works',
  6300: 'application/vnd.ms-wpl',
  6310: 'application/vnd.ms-xpsdocument',
  6400: 'application/vnd.ms-fontobject',
  6410: 'application/vnd.ms-htmlhelp',
  6420: 'application/vnd.ms-ims',
  6430: 'application/vnd.ms-lrm',
  6440: 'application/vnd.ms-officetheme',
  6450: 'application/vnd.ms-pki.seccat',
  6460: 'application/vnd.ms-pki.stl',
  6470: 'application/vnd.ms-artgalry',
  6480: 'application/vnd.ms-cab-compressed',
  6490: 'application/x-ms-application',
  6500: 'application/x-ms-shortcut',
  6510: 'application/x-ms-wmd',
  6520: 'application/x-ms-wmz',
  6530: 'application/x-ms-xbap',
  6540: 'application/x-msaccess',
  6550: 'application/x-msbinder',
  6560: 'application/x-mscardfile',
  6570: 'application/x-msclip',
  6580: 'application/x-msdownload',
  6581: 'application/x-msdownload',
  6582: 'application/x-msdownload',
  6583: 'application/x-msdownload',
  6584: 'application/x-msdownload',
  6590: 'application/x-msmediaview',
  6591: 'application/x-msmediaview',
  6592: 'application/x-msmediaview',
  6600: 'application/x-msmetafile',
  6601: 'application/x-msmetafile',
  6602: 'application/x-msmetafile',
  6603: 'application/x-msmetafile',
  6610: 'application/x-msmoney',
  6620: 'application/x-mspublisher',
  6630: 'application/x-msschedule',
  6640: 'application/x-msterminal',
  6650: 'application/x-mswrite',
  6800: 'application/vnd.oasis.opendocument.chart',
  6810: 'application/vnd.oasis.opendocument.chart-template',
  6820: 'application/vnd.oasis.opendocument.database',
  6830: 'application/vnd.oasis.opendocument.formula',
  6840: 'application/vnd.oasis.opendocument.formula-template',
  6850: 'application/vnd.oasis.opendocument.graphics',
  6860: 'application/vnd.oasis.opendocument.graphics-template',
  6870: 'application/vnd.oasis.opendocument.image',
  6880: 'application/vnd.oasis.opendocument.image-template',
  6890: 'application/vnd.oasis.opendocument.presentation',
  6900: 'application/vnd.oasis.opendocument.presentation-template',
  6910: 'application/vnd.oasis.opendocument.spreadsheet',
  6920: 'application/vnd.oasis.opendocument.spreadsheet-template',
  6930: 'application/vnd.oasis.opendocument.text',
  6940: 'application/vnd.oasis.opendocument.text-master',
  6950: 'application/vnd.oasis.opendocument.text-template',
  6960: 'application/vnd.oasis.opendocument.text-web',
  6970: 'application/vnd.openofficeorg.extension',
  7100: 'application/vnd.lotus-1-2-3',
  7110: 'application/vnd.lotus-approach',
  7120: 'application/vnd.lotus-freelance',
  7130: 'application/vnd.lotus-notes',
  7140: 'application/vnd.lotus-organizer',
  7150: 'application/vnd.lotus-screencam',
  7160: 'application/vnd.lotus-wordpro',
  7200: 'application/postscript',
  7201: 'application/postscript',
  7202: 'application/postscript',
  7203: 'application/postscript',
  8000: 'application/vnd.symbian.install',
  8001: 'application/vnd.symbian.install',
  8010: 'application/vnd.nokia.n-gage.symbian.install',
  8020: 'application/vnd.adobe.air-application-installer-package+zip',
  8030: 'application/vnd.apple.installer+xml',
  8040: 'application/vnd.android.package-archive',
  8050: 'application/x-install-instructions',
  8060: 'application/x-xpinstall',
  8070: 'application/x-chrome-extension',
  8500: 'application/zip',
  8510: 'application/x-bzip',
  8520: 'application/x-bzip2',
  8521: 'application/x-bzip2',
  8530: 'application/x-compress',
  8540: 'application/gzip',
  8550: 'application/gzip',
  8551: 'application/x-gzip',
  8560: 'application/x-tar',
  8570: 'application/x-rar-compressed',
  8580: 'application/x-lzh-compressed',
  8581: 'application/x-lzh-compressed',
  8590: 'application/x-7z-compressed',
  8600: 'application/x-ace-compressed',
  8610: 'application/x-gca-compressed',
  8620: 'application/x-cfs-compressed',
  8630: 'application/x-dgc-compressed',
  8640: 'application/x-ustar',
  8650: 'application/x-gtar',
  8660: 'application/x-xz',
  30010: 'application/andrew-inset',
  30020: 'application/applixware',
  30030: 'application/atom+xml',
  30040: 'application/atomcat+xml',
  30050: 'application/atomsvc+xml',
  30060: 'application/ccxml+xml',
  30070: 'application/cdmi-capability',
  30080: 'application/cdmi-container',
  30090: 'application/cdmi-domain',
  30100: 'application/cdmi-object',
  30110: 'application/cdmi-queue',
  30120: 'application/cu-seeme',
  30130: 'application/davmount+xml',
  30140: 'application/docbook+xml',
  30150: 'application/dssc+der',
  30160: 'application/dssc+xml',
  30170: 'application/ecmascript',
  30180: 'application/emma+xml',
  30190: 'application/epub+zip',
  30200: 'application/exi',
  30210: 'application/font-tdpfr',
  30220: 'application/gml+xml',
  30230: 'application/gpx+xml',
  30240: 'application/gxf',
  30250: 'application/hyperstudio',
  30260: 'application/inkml+xml',
  30261: 'application/inkml+xml',
  30270: 'application/ipfix',
  30280: 'application/mac-binhex40',
  30290: 'application/mac-compactpro',
  30300: 'application/mads+xml',
  30310: 'application/marc',
  30320: 'application/marcxml+xml',
  30330: 'application/mathematica',
  30331: 'application/mathematica',
  30332: 'application/mathematica',
  30340: 'application/mathml+xml',
  30350: 'application/mbox',
  30360: 'application/mediaservercontrol+xml',
  30370: 'application/metalink+xml',
  30380: 'application/metalink4+xml',
  30390: 'application/mets+xml',
  30400: 'application/mods+xml',
  30410: 'application/mp21',
  30411: 'application/mp21',
  30420: 'application/mp4',
  30430: 'application/mxf',
  30440: 'application/octet-stream',
  30441: 'application/octet-stream',
  30442: 'application/octet-stream',
  30443: 'application/octet-stream',
  30444: 'application/octet-stream',
  30445: 'application/octet-stream',
  30446: 'application/octet-stream',
  30447: 'application/octet-stream',
  30448: 'application/octet-stream',
  30449: 'application/octet-stream',
  30450: 'application/octet-stream',
  30451: 'application/octet-stream',
  30470: 'application/oda',
  30480: 'application/oebps-package+xml',
  30490: 'application/ogg',
  30500: 'application/omdoc+xml',
  30510: 'application/onenote',
  30511: 'application/onenote',
  30512: 'application/onenote',
  30513: 'application/onenote',
  30520: 'application/oxps',
  30530: 'application/patch-ops-error+xml',
  30540: 'application/pgp-encrypted',
  30550: 'application/pgp-signature',
  30551: 'application/pgp-signature',
  30560: 'application/pics-rules',
  30570: 'application/pkcs10',
  30580: 'application/pkcs7-mime',
  30581: 'application/pkcs7-mime',
  30590: 'application/pkcs7-signature',
  30600: 'application/pkcs8',
  30610: 'application/pkix-attr-cert',
  30620: 'application/pkix-cert',
  30630: 'application/pkix-crl',
  30640: 'application/pkix-pkipath',
  30650: 'application/pkixcmp',
  30660: 'application/pls+xml',
  30670: 'application/prs.cww',
  30680: 'application/pskc+xml',
  30690: 'application/rdf+xml',
  30700: 'application/reginfo+xml',
  30710: 'application/relax-ng-compact-syntax',
  30720: 'application/resource-lists+xml',
  30730: 'application/resource-lists-diff+xml',
  30740: 'application/rls-services+xml',
  30750: 'application/rpki-ghostbusters',
  30760: 'application/rpki-manifest',
  30770: 'application/rpki-roa',
  30780: 'application/rsd+xml',
  30790: 'application/sbml+xml',
  30800: 'application/scvp-cv-request',
  30810: 'application/scvp-cv-response',
  30820: 'application/scvp-vp-request',
  30830: 'application/scvp-vp-response',
  30840: 'application/sdp',
  30850: 'application/set-payment-initiation',
  30860: 'application/set-registration-initiation',
  30870: 'application/shf+xml',
  30880: 'application/sparql-query',
  30890: 'application/sparql-results+xml',
  30900: 'application/srgs',
  39010: 'application/srgs+xml',
  30920: 'application/sru+xml',
  30930: 'application/ssdl+xml',
  30940: 'application/ssml+xml',
  30950: 'application/tei+xml',
  30960: 'application/tei+xml',
  30970: 'application/thraud+xml',
  30980: 'application/timestamped-data',
  30990: 'application/vnd.3gpp.pic-bw-large',
  31000: 'application/vnd.3gpp.pic-bw-small',
  31010: 'application/vnd.3gpp.pic-bw-var',
  31020: 'application/vnd.3gpp2.tcap',
  31030: 'application/vnd.3m.post-it-notes',
  31040: 'application/vnd.accpac.simply.aso',
  31050: 'application/vnd.accpac.simply.imp',
  31060: 'application/vnd.acucobol',
  31070: 'application/vnd.acucorp',
  31071: 'application/vnd.acucorp',
  31080: 'application/vnd.adobe.formscentral.fcdt',
  31090: 'application/vnd.adobe.fxp',
  31191: 'application/vnd.adobe.fxp',
  31100: 'application/vnd.adobe.xdp+xml',
  31110: 'application/vnd.adobe.xfdf',
  31120: 'application/vnd.ahead.space',
  31130: 'application/vnd.airzip.filesecure.azf',
  31140: 'application/vnd.airzip.filesecure.azs',
  31150: 'application/vnd.amazon.ebook',
  31160: 'application/vnd.americandynamics.acc',
  31170: 'application/vnd.amiga.ami',
  31180: 'application/vnd.anser-web-certificate-issue-initiation',
  31190: 'application/vnd.anser-web-funds-transfer-initiation',
  31200: 'application/vnd.antix.game-component',
  31210: 'application/vnd.apple.mpegurl',
  31220: 'application/vnd.aristanetworks.swi',
  31230: 'application/vnd.astraea-software.iota',
  31240: 'application/vnd.audiograph',
  31250: 'application/vnd.blueice.multipass',
  31260: 'application/vnd.bmi',
  31270: 'application/vnd.businessobjects',
  31280: 'application/vnd.chemdraw+xml',
  31290: 'application/vnd.chipnuts.karaoke-mmd',
  31300: 'application/vnd.cinderella',
  31310: 'application/vnd.claymore',
  31320: 'application/vnd.cloanto.rp9',
  31330: 'application/vnd.clonk.c4group',
  31331: 'application/vnd.clonk.c4group',
  31332: 'application/vnd.clonk.c4group',
  31333: 'application/vnd.clonk.c4group',
  31334: 'application/vnd.clonk.c4group',
  31340: 'application/vnd.cluetrust.cartomobile-config',
  31350: 'application/vnd.cluetrust.cartomobile-config-pkg',
  31360: 'application/vnd.commonspace',
  31370: 'application/vnd.contact.cmsg',
  31380: 'application/vnd.cosmocaller',
  31390: 'application/vnd.crick.clicker',
  31400: 'application/vnd.crick.clicker.keyboard',
  31410: 'application/vnd.crick.clicker.palette',
  31420: 'application/vnd.crick.clicker.template',
  31430: 'application/vnd.crick.clicker.wordbank',
  31440: 'application/vnd.criticaltools.wbs+xml',
  31450: 'application/vnd.ctc-posml',
  31460: 'application/vnd.cups-ppd',
  31470: 'application/vnd.curl.car',
  31480: 'application/vnd.curl.pcurl',
  31490: 'application/vnd.dart',
  31500: 'application/vnd.data-vision.rdz',
  31510: 'application/vnd.dece.data',
  31511: 'application/vnd.dece.data',
  31512: 'application/vnd.dece.data',
  31513: 'application/vnd.dece.data',
  31520: 'application/vnd.dece.ttml+xml',
  31521: 'application/vnd.dece.ttml+xml',
  31530: 'application/vnd.dece.unspecified',
  31531: 'application/vnd.dece.unspecified',
  31540: 'application/vnd.dece.zip',
  31541: 'application/vnd.dece.zip',
  31550: 'application/vnd.denovo.fcselayout-link',
  31560: 'application/vnd.dna',
  31570: 'application/vnd.dolby.mlp',
  31580: 'application/vnd.dpgraph',
  31590: 'application/vnd.dreamfactory',
  31600: 'application/vnd.ds-keypoint',
  31610: 'application/vnd.dvb.ait',
  31620: 'application/vnd.dvb.service',
  31630: 'application/vnd.dynageo',
  31640: 'application/vnd.ecowin.chart',
  31650: 'application/vnd.enliven',
  31660: 'application/vnd.epson.esf',
  31670: 'application/vnd.epson.msf',
  31680: 'application/vnd.epson.quickanime',
  31690: 'application/vnd.epson.salt',
  31700: 'application/vnd.epson.ssf',
  31710: 'application/vnd.eszigno3+xml',
  31711: 'application/vnd.eszigno3+xml',
  31720: 'application/vnd.ezpix-album',
  31730: 'application/vnd.ezpix-package',
  31740: 'application/vnd.fdf',
  31750: 'application/vnd.fdsn.mseed',
  31760: 'application/vnd.fdsn.seed',
  31761: 'application/vnd.fdsn.seed',
  31770: 'application/vnd.flographit',
  31780: 'application/vnd.fluxtime.clip',
  31790: 'application/vnd.framemaker',
  31791: 'application/vnd.framemaker',
  31792: 'application/vnd.framemaker',
  31793: 'application/vnd.framemaker',
  31800: 'application/vnd.frogans.fnc',
  31810: 'application/vnd.frogans.ltf',
  31820: 'application/vnd.fsc.weblaunch',
  31830: 'application/vnd.fujitsu.oasys',
  31840: 'application/vnd.fujitsu.oasys2',
  31850: 'application/vnd.fujitsu.oasys3',
  31860: 'application/vnd.fujitsu.oasysgp',
  31870: 'application/vnd.fujitsu.oasysprs',
  31880: 'application/vnd.fujixerox.ddd',
  31890: 'application/vnd.fujixerox.docuworks',
  31900: 'application/vnd.fujixerox.docuworks.binder',
  31910: 'application/vnd.fuzzysheet',
  31920: 'application/vnd.genomatix.tuxedo',
  31930: 'application/vnd.geogebra.file',
  31940: 'application/vnd.geogebra.tool',
  31950: 'application/vnd.geometry-explorer',
  31951: 'application/vnd.geometry-explorer',
  31960: 'application/vnd.geonext',
  31970: 'application/vnd.geoplan',
  31980: 'application/vnd.geospace',
  31990: 'application/vnd.gmx',
  32000: 'application/vnd.google-earth.kml+xml',
  32010: 'application/vnd.google-earth.kmz',
  32020: 'application/vnd.grafeq',
  32021: 'application/vnd.grafeq',
  32030: 'application/vnd.groove-account',
  32040: 'application/vnd.groove-help',
  32050: 'application/vnd.groove-identity-message',
  32060: 'application/vnd.groove-injector',
  32070: 'application/vnd.groove-tool-message',
  32080: 'application/vnd.groove-tool-template',
  32090: 'application/vnd.groove-vcard',
  32100: 'application/vnd.hal+xml',
  32110: 'application/vnd.handheld-entertainment+xml',
  32120: 'application/vnd.hbci',
  32130: 'application/vnd.hhe.lesson-player',
  32140: 'application/vnd.hp-hpgl',
  32141: 'application/vnd.hp-hpid',
  32150: 'application/vnd.hp-hps',
  32160: 'application/vnd.hp-jlyt',
  32170: 'application/vnd.hp-pcl',
  32180: 'application/vnd.hp-pclxl',
  32190: 'application/vnd.hydrostatix.sof-data',
  32200: 'application/vnd.ibm.minipay',
  32210: 'application/vnd.ibm.modcap',
  32220: 'application/vnd.ibm.modcap',
  32230: 'application/vnd.ibm.modcap',
  32240: 'application/vnd.ibm.rights-management',
  32250: 'application/vnd.ibm.secure-container',
  32260: 'application/vnd.iccprofile',
  32261: 'application/vnd.iccprofile',
  32270: 'application/vnd.igloader',
  32280: 'application/vnd.immervision-ivp',
  32290: 'application/vnd.immervision-ivu',
  32300: 'application/vnd.insors.igm',
  32310: 'application/vnd.intercon.formnet',
  32311: 'application/vnd.intercon.formnet',
  32320: 'application/vnd.intergeo',
  32330: 'application/vnd.intu.qbo',
  32340: 'application/vnd.intu.qfx',
  32350: 'application/vnd.ipunplugged.rcprofile',
  32360: 'application/vnd.irepository.package+xml',
  32370: 'application/vnd.is-xpr',
  32380: 'application/vnd.isac.fcs',
  32390: 'application/vnd.jam',
  32400: 'application/vnd.jisp',
  32410: 'application/vnd.joost.joda-archive',
  32420: 'application/vnd.kahootz',
  32421: 'application/vnd.kahootz',
  32430: 'application/vnd.kde.karbon',
  32440: 'application/vnd.kde.kchart',
  32450: 'application/vnd.kde.kformula',
  32460: 'application/vnd.kde.kivio',
  32470: 'application/vnd.kde.kontour',
  32480: 'application/vnd.kde.kpresenter',
  32481: 'application/vnd.kde.kpresenter',
  32490: 'application/vnd.kde.kspread',
  32500: 'application/vnd.kde.kword',
  32501: 'application/vnd.kde.kword',
  32510: 'application/vnd.kenameaapp',
  32520: 'application/vnd.kidspiration',
  32530: 'application/vnd.kinar',
  32531: 'application/vnd.kinar',
  32540: 'application/vnd.koan',
  32541: 'application/vnd.koan',
  32542: 'application/vnd.koan',
  32543: 'application/vnd.koan',
  32550: 'application/vnd.kodak-descriptor',
  32560: 'application/vnd.las.las+xml',
  32570: 'application/vnd.llamagraphics.life-balance.desktop',
  32580: 'application/vnd.llamagraphics.life-balance.exchange+xml',
  32590: 'application/vnd.macports.portpkg',
  32600: 'application/vnd.mcd',
  32610: 'application/vnd.medcalcdata',
  32620: 'application/vnd.mediastation.cdkey',
  32630: 'application/vnd.mfer',
  32640: 'application/vnd.mfmp',
  32650: 'application/vnd.micrografx.flo',
  32660: 'application/vnd.micrografx.igx',
  32670: 'application/vnd.mif',
  32680: 'application/vnd.mobius.daf',
  32690: 'application/vnd.mobius.dis',
  32700: 'application/vnd.mobius.mbk',
  32710: 'application/vnd.mobius.mqy',
  32720: 'application/vnd.mobius.msl',
  32730: 'application/vnd.mobius.plc',
  32740: 'application/vnd.mobius.txf',
  32750: 'application/vnd.mophun.application',
  32760: 'application/vnd.mophun.certificate',
  32770: 'application/vnd.mozilla.xul+xml',
  32780: 'application/vnd.mseq',
  32790: 'application/vnd.musician',
  32800: 'application/vnd.muvee.style',
  32810: 'application/vnd.mynfc',
  32820: 'application/vnd.neurolanguage.nlu',
  32830: 'application/vnd.nitf',
  32840: 'application/vnd.nitf',
  32850: 'application/vnd.noblenet-directory',
  32860: 'application/vnd.noblenet-sealer',
  32870: 'application/vnd.noblenet-web',
  32880: 'application/vnd.nokia.n-gage.data',
  32890: 'application/vnd.nokia.radio-preset',
  32900: 'application/vnd.nokia.radio-presets',
  32910: 'application/vnd.novadigm.edm',
  32920: 'application/vnd.novadigm.edx',
  32930: 'application/vnd.novadigm.ext',
  32940: 'application/vnd.olpc-sugar',
  32950: 'application/vnd.oma.dd2+xml',
  32960: 'application/vnd.osgeo.mapguide.package',
  32970: 'application/vnd.osgi.dp',
  32980: 'application/vnd.osgi.subsystem',
  32990: 'application/vnd.palm',
  32991: 'application/vnd.palm',
  32992: 'application/vnd.palm',
  33000: 'application/vnd.pawaafile',
  33010: 'application/vnd.pg.format',
  33020: 'application/vnd.pg.osasli',
  33030: 'application/vnd.picsel',
  33040: 'application/vnd.pmi.widget',
  33050: 'application/vnd.pocketlearn',
  33060: 'application/vnd.powerbuilder6',
  33070: 'application/vnd.previewsystems.box',
  33080: 'application/vnd.proteus.magazine',
  33090: 'application/vnd.publishare-delta-tree',
  33100: 'application/vnd.pvi.ptid1',
  33120: 'application/vnd.quark.quarkxpress',
  33121: 'application/vnd.quark.quarkxpress',
  33122: 'application/vnd.quark.quarkxpress',
  33123: 'application/vnd.quark.quarkxpress',
  33124: 'application/vnd.quark.quarkxpress',
  33125: 'application/vnd.quark.quarkxpress',
  33130: 'application/vnd.realvnc.bed',
  33140: 'application/vnd.recordare.musicxml',
  33150: 'application/vnd.recordare.musicxml+xml',
  33160: 'application/vnd.rig.cryptonote',
  33170: 'application/vnd.rim.cod',
  33200: 'application/vnd.route66.link66+xml',
  33210: 'application/vnd.sailingtracker.track',
  33220: 'application/vnd.seemail',
  33230: 'application/vnd.sema',
  33240: 'application/vnd.semd',
  33250: 'application/vnd.semf',
  33260: 'application/vnd.shana.informed.formdata',
  33270: 'application/vnd.shana.informed.formtemplate',
  33280: 'application/vnd.shana.informed.interchange',
  33290: 'application/vnd.shana.informed.package',
  33300: 'application/vnd.simtech-mindmapper',
  33310: 'application/vnd.simtech-mindmapper',
  33320: 'application/vnd.smaf',
  33330: 'application/vnd.smart.teacher',
  33340: 'application/vnd.solent.sdkm+xml',
  33341: 'application/vnd.solent.sdkm+xml',
  33350: 'application/vnd.spotfire.dxp',
  33360: 'application/vnd.spotfire.sfs',
  33370: 'application/vnd.stardivision.calc',
  33380: 'application/vnd.stardivision.draw',
  33390: 'application/vnd.stardivision.impress',
  33410: 'application/vnd.stardivision.math',
  33420: 'application/vnd.stardivision.writer',
  33421: 'application/vnd.stardivision.writer',
  33430: 'application/vnd.stardivision.writer-global',
  33440: 'application/vnd.stepmania.package',
  33450: 'application/vnd.stepmania.stepchart',
  33460: 'application/vnd.sun.xml.calc',
  33470: 'application/vnd.sun.xml.calc.template',
  33480: 'application/vnd.sun.xml.draw',
  33490: 'application/vnd.sun.xml.draw.template',
  33500: 'application/vnd.sun.xml.impress',
  33560: 'application/vnd.sun.xml.impress.template',
  33570: 'application/vnd.sun.xml.math',
  33580: 'application/vnd.sun.xml.writer',
  33590: 'application/vnd.sun.xml.writer.global',
  33600: 'application/vnd.sun.xml.writer.template',
  33610: 'application/vnd.sus-calendar',
  33620: 'application/vnd.sus-calendar',
  33630: 'application/vnd.svd',
  33640: 'application/vnd.tao.intent-module-archive',
  33650: 'application/vnd.tcpdump.pcap',
  33651: 'application/vnd.tcpdump.pcap',
  33652: 'application/vnd.tcpdump.pcap',
  33660: 'application/vnd.tmobile-livetv',
  33670: 'application/vnd.trid.tpt',
  33680: 'application/vnd.triscape.mxs',
  33690: 'application/vnd.trueapp',
  33700: 'application/vnd.ufdl',
  33710: 'application/vnd.uiq.theme',
  33720: 'application/vnd.umajin',
  33730: 'application/vnd.unity',
  33740: 'application/vnd.uoml+xml',
  33750: 'application/vnd.vcx',
  33760: 'application/vnd.visionary',
  33770: 'application/vnd.vsf',
  33780: 'application/vnd.webturbo',
  33790: 'application/vnd.wolfram.player',
  33800: 'application/vnd.wordperfect',
  33810: 'application/vnd.wqd',
  33820: 'application/vnd.wt.stf',
  33830: 'application/vnd.xara',
  33840: 'application/vnd.xfdl',
  33850: 'application/vnd.yamaha.hv-dic',
  33860: 'application/vnd.yamaha.hv-script',
  33870: 'application/vnd.yamaha.hv-voice',
  33880: 'application/vnd.yamaha.openscoreformat',
  33890: 'application/vnd.yamaha.openscoreformat.osfpvg+xml',
  33900: 'application/vnd.yamaha.smaf-audio',
  33910: 'application/vnd.yamaha.smaf-phrase',
  33920: 'application/vnd.yellowriver-custom-menu',
  33930: 'application/vnd.zul',
  33940: 'application/vnd.zul',
  33950: 'application/vnd.zzazz.deck+xml',
  33960: 'application/widget',
  33970: 'application/x-abiword',
  33980: 'application/x-apple-diskimage',
  33990: 'application/x-authorware-bin',
  33991: 'application/x-authorware-bin',
  33992: 'application/x-authorware-bin',
  33993: 'application/x-authorware-bin',
  34000: 'application/x-authorware-map',
  34010: 'application/x-authorware-seg',
  34020: 'application/x-bcpio',
  34030: 'application/x-bittorrent',
  34040: 'application/x-blorb',
  34041: 'application/x-blorb',
  34050: 'application/x-cbr',
  34051: 'application/x-cbr',
  34052: 'application/x-cbr',
  34053: 'application/x-cbr',
  34054: 'application/x-cbr',
  34060: 'application/x-cdlink',
  34070: 'application/x-chat',
  34080: 'application/x-chess-pgn',
  34090: 'application/x-conference',
  34100: 'application/x-cpio',
  34110: 'application/x-csh',
  34120: 'application/x-debian-package',
  34130: 'application/x-debian-package',
  34140: 'application/x-director',
  34141: 'application/x-director',
  34142: 'application/x-director',
  34143: 'application/x-director',
  34144: 'application/x-director',
  34145: 'application/x-director',
  34146: 'application/x-director',
  34147: 'application/x-director',
  34148: 'application/x-director',
  34150: 'application/x-doom',
  34160: 'application/x-dtbncx+xml',
  34161: 'application/x-dtbook+xml',
  34170: 'application/x-dtbresource+xml',
  34180: 'application/x-dvi',
  34190: 'application/x-envoy',
  34200: 'application/x-eva',
  34210: 'application/x-font-bdf',
  34220: 'application/x-font-ghostscript',
  34230: 'application/x-font-linux-psf',
  34240: 'application/x-font-otf',
  34250: 'application/x-font-pcf',
  34260: 'application/x-font-snf',
  34270: 'application/x-font-ttf',
  34271: 'application/x-font-ttf',
  34280: 'application/x-font-type1',
  34281: 'application/x-font-type1',
  34282: 'application/x-font-type1',
  34283: 'application/x-font-type1',
  34290: 'application/x-font-woff',
  34300: 'application/x-freearc',
  34310: 'application/x-futuresplash',
  34320: 'application/x-glulx',
  34330: 'application/x-gnumeric',
  34340: 'application/x-gramps-xml',
  34360: 'application/x-hdf',
  34370: 'application/x-iso9660-image',
  34380: 'application/x-latex',
  34381: 'application/x-latex',
  34390: 'application/x-mie',
  34400: 'application/x-mobipocket-ebook',
  34401: 'application/x-mobipocket-ebook',
  34410: 'application/x-netcdf',
  34411: 'application/x-netcdf',
  34420: 'application/x-nzb',
  34430: 'application/x-pkcs12',
  34431: 'application/x-pkcs12',
  34440: 'application/x-pkcs7-certificates',
  34441: 'application/x-pkcs7-certificates',
  34450: 'application/x-pkcs7-certreqresp',
  34460: 'application/x-research-info-systems',
  34470: 'application/x-sh',
  34480: 'application/x-shar',
  34490: 'application/x-silverlight-app',
  34500: 'application/x-sql',
  34510: 'application/x-stuffit',
  34520: 'application/x-stuffitx',
  34530: 'application/x-subrip',
  34540: 'application/x-sv4cpio',
  34550: 'application/x-sv4crc',
  34560: 'application/x-t3vm-image',
  34570: 'application/x-tads',
  34580: 'application/x-tcl',
  34590: 'application/x-tex',
  34600: 'application/x-tex-tfm',
  34610: 'application/x-texinfo',
  34620: 'application/x-texinfo',
  34630: 'application/x-tgif',
  34640: 'application/x-wais-source',
  34650: 'application/x-x509-ca-cert',
  34651: 'application/x-x509-ca-cert',
  34660: 'application/x-xfig',
  34670: 'application/x-xliff+xml',
  34680: 'application/x-zmachine',
  34681: 'application/x-zmachine',
  34682: 'application/x-zmachine',
  34683: 'application/x-zmachine',
  34684: 'application/x-zmachine',
  34685: 'application/x-zmachine',
  34686: 'application/x-zmachine',
  34687: 'application/x-zmachine',
  34690: 'application/xaml+xml',
  34700: 'application/yang',
  34710: 'chemical/x-cdx',
  34720: 'chemical/x-cif',
  34730: 'chemical/x-cmdf',
  34740: 'chemical/x-cml',
  34750: 'chemical/x-csml',
  34760: 'chemical/x-xyz',
  34770: 'message/rfc822',
  34771: 'message/rfc822',
  34790: 'model/iges',
  34791: 'model/iges',
  34800: 'model/mesh',
  34801: 'model/mesh',
  34802: 'model/mesh',
  34810: 'model/vnd.collada+xml',
  34820: 'model/vnd.dwf',
  34830: 'model/vnd.gdl',
  34840: 'model/vnd.gtw',
  34850: 'model/vnd.mts',
  34860: 'model/vnd.vtu',
  34870: 'model/vrml',
  34871: 'model/vrml',
  34880: 'model/x3d+binary',
  34881: 'model/x3d+binary',
  34890: 'model/x3d+vrml',
  34891: 'model/x3d+vrml',
  34900: 'model/x3d+xml',
  34901: 'model/x3d+xml',
  41000: 'application/x-xdma',
  41010: 'application/x-perl',
  41020: 'application/activexdocument',
}

export function getVideoPlayUrl(row) {
  if (row.playurl) {
    return row.playurl
  } else {
    let baseUrl = process.env.VUE_APP_BASE_CLOUDSERVICE_API_URL + '/view?fid='
    if (row.fid) {
      baseUrl += row.fid
      baseUrl += '&corpid=' + store.getters.corpinfo.corpid
      baseUrl += '&subid=' + store.getters.subinfo.subid
      baseUrl += '&uid=' + store.getters.userinfo.uid
    } else {
      if (row.isself && row.isself == 1) {
        baseUrl += row.sourceid
        baseUrl += '&corpid=' + row.corpid
        baseUrl += '&subid=' + row.subid
        baseUrl += '&uid=' + row.uid
      } else {
        return row.url
      }
    }
    return baseUrl
  }

}

export function formatSeconToTime(value) {
  let t;
  if (value > -1) {
    let hour = Math.floor(value/3600)
    let min = Math.floor(value/60) % 60;
    let sec = value % 60
    if(hour < 10) {
      t = '0'
    }
    t += hour + ':'
    if (min < 10) {
      t +=  '0'
    }
    t += min + ':'
    if (sec < 10) {
      t += '0'
    }
    t += sec
  }
  return t
}



